package org.srn;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;

public class SRNConnection {
	int count;
	String host = "talk.google.com";
    int port = 5222;
    Socket socket;
    BufferedReader in;
    PrintWriter out;
    
    public String getHost() {
        return host;
    }

    public int getPort() {
        return port;
    }
    
    public SRNConnection(){
    	connect();
    }
    
    public void connect(){
    	try
    	{
    		this.socket = new Socket(host, port);
    		
    		//create in
    		in = new BufferedReader(new InputStreamReader(socket.getInputStream())); 
    		//create out
    		out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));

    		
    	}catch(Exception ex)
    	{
    		System.out.println("connect error"+ ex);
    	}
    }
}
